package com.zys.principles.demo5.emp2;

public class GraphicEditor {
    public void drawShape(Shape s){
        s.draw();
    }

}

abstract class Shape{
    int m_type;
    public abstract void draw();
}

class Rectangle extends Shape{
    Rectangle(){
        super.m_type = 1;
    }

    @Override
    public void draw() {
        System.out.println("Rectangle");
    }
}

class Circle extends Shape{
    Circle(){
        super.m_type = 2;
    }

    @Override
    public void draw() {
        System.out.println("Circle");
    }
}
